import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-03-09
 * Time: 17:52
 */
public class test {
    public static double avg(int[] arr){
        int num = 0;
        for (int i = 0; i < arr.length; i++) {
            num += arr[i];
        }
        return num / arr.length;
    }
    public static void main(String[] args) {
        int[] arr = {2,4,6,8,10};
        double ret = avg(arr);
        System.out.println(ret);
    }
    public static int sum(int[] arr){
        int num = 0;
        for (int i = 0; i <arr.length ; i++) {
            num += arr[i];
        }
        return num;
    }
    public static void main4(String[] args) {
        int[] arr = {1,2,3,4,5};
        int ret = sum(arr);
        System.out.println(ret);
    }
    public static void transfrom(int[] arr){
        for (int i = 0; i < arr.length; i++) {
            arr[i] = arr[i] * 2;
            System.out.print(arr[i]+" ");
        }
    }
    public static void main3(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        transfrom(arr);
    }
    public static void printArray(int[] arr){
        for (int i = 0; i <arr.length ; i++) {
            System.out.print(arr[i]+" ");
        }
    }
    public static void main2(String[] args) {
        int[] arr = {1,2,3,4,5,6,7,8,9,10};
        printArray(arr);
    }
    public static void main0(String[] args) {
        int[] arr = new int[100];
        for (int i = 0; i < 100; i++) {
            System.out.print((arr[i]+i+1)+" ");
        }
    }
}
